/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package com.plian.system.service.or.impl;
import com.plian.system.entity.or.InCharge;
import com.plian.system.mapper.or.InChargeMapper;
import com.plian.system.mybatis.base.BaseServiceImpl;
import com.plian.system.service.or.IInChargeService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * 监事会管理 年度工作计划 服务实现类
 *
 * @author BladeX
 * @since 2021-05-07
 */
@Slf4j
@Service
@AllArgsConstructor
public class InChargeServiceImpl extends BaseServiceImpl<InChargeMapper, InCharge> implements IInChargeService {


//    /** TODO DEL
//     * @Author: Take-off
//     * @Description: //TODO 批量保存公文轮阅角色
//     * @Date: 9:52 AM 2022/7/25
//     * @Param: [dto]
//     * @return: boolean
//     **/
//    @Override
//    public boolean saveList(InChargeDTO dto){
//        boolean result = true;
//        //删除原来的
//        String userRole = dto.getUserRole();
//        List<InCharge> list = list(new LambdaQueryWrapper<InCharge>().eq(InCharge::getUserRole,userRole));
//        if (CollectionUtil.isNotEmpty(list)){
//            deleteLogic(list.stream().map(InCharge::getId).collect(Collectors.toList()));
//        }
//
//        List<String> inCharges = dto.getInCharges();
//        if (CollectionUtil.isNotEmpty(inCharges)){
//            for (String chargeId:inCharges){
//                InCharge inCharge = new InCharge();
//                inCharge.setUserId(chargeId);
//                inCharge.setUserRole(userRole);
//                result = saveOrUpdate(inCharge);
//            }
//        }
//        return result;
//    }


}
